.NET Framework Class Library |
IProducerConsumerCollection<(Of <(T>)>)..::.TryTake Method |
IProducerConsumerCollection<(Of <(T>)>) Interface See Also Send Feedback |
Attempts to remove and return an object from the IProducerConsumerCollection<(Of <(T>)>).
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Function TryTake ( _ <OutAttribute> ByRef item As T _ ) As Boolean |
C# |
---|
bool TryTake( out T item ) |
Parameters
- item
- Type:
T
%
When this method returns, if the object was removed and returned successfully, item contains the removed object. If no object was available to be removed, the value is unspecified.